requirejs.config({
	//baseUrl: 'js/lib',
	paths:{
        zepto:"../lib/zepto.min",
        frozen:"../lib/frozen",
		swiper:"../lib/swiper3.08.jquery.min",
        modernizr:"../lib/modernizr.custom"
	}
})
require( ['zepto','frozen','swiper','modernizr'], function( zepto,frozen,swiper,modernizr){
	$(".ui-header .searchRole a").click(function(){
        $(".ui-header .searchRole a").removeClass("selected");
        $(this).addClass("selected");
    })
    var slider = new fz.Scroll('.ui-slider', {
        role: 'slider',
        indicator: true,
        autoplay: true,
        interval: 3000
    });
    var swiper = new Swiper('.swiper-container', {
        //pagination: '.swiper-pagination',
        slidesPerView: 3,
        centeredSlides: false,
        paginationClickable: true,
        spaceBetween: "3%",
        grabCursor: true
    });
    var containerParent = $("#sidebarEffect"),
    elem = $('.ui-header .icon-menu'),
    resetMenu = function(){
        setTimeout(function(){
            containerParent.css("z-index","0").hide();

        },500)
        containerParent.removeClass('st-menu-open');
    },
    bodyClickFn = function(evt) {
        resetMenu();
        var mask = $("<div id='mask'></div>");
        $("body").append(mask);
        //$(document).unbind("click",bodyClickFn);
    };
    elem.click(function(ev){
        var effect = $(this).attr('data-effect');
        containerParent.css("z-index","100").show();
        containerParent.addClass("st-menu-open");
        ev.stopPropagation();
        ev.preventDefault();
        $(document).bind("click",bodyClickFn);
    });
    containerParent.click(function(e){
        e.stopPropagation();
    })

})